package com.qj.yantaishan.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import com.qj.yantaishan.mapper.StoreAnalyticsMapper;
import com.qj.yantaishan.domain.StoreAnalytics;
import com.qj.yantaishan.service.IStoreAnalyticsService;
import com.qj.yantaishan.common.core.text.Convert;

/**
 * 店铺访问统计Service业务层处理
 * 
 * @author qihe
 * @date 2022-07-22
 */
@Service
@Primary
public class StoreAnalyticsServiceImpl    extends ServiceImpl<StoreAnalyticsMapper, StoreAnalytics>  implements IStoreAnalyticsService
{
    @Autowired
    private StoreAnalyticsMapper storeAnalyticsMapper;

    /**
     * 查询店铺访问统计
     * 
     * @param pigcmsId 店铺访问统计主键
     * @return 店铺访问统计
     */
    @Override
    public StoreAnalytics selectStoreAnalyticsByPigcmsId(Long pigcmsId)
    {
        return storeAnalyticsMapper.selectStoreAnalyticsByPigcmsId(pigcmsId);
    }

    /**
     * 查询店铺访问统计列表
     * 
     * @param storeAnalytics 店铺访问统计
     * @return 店铺访问统计
     */
    @Override
    public List<StoreAnalytics> selectStoreAnalyticsList(StoreAnalytics storeAnalytics)
    {
        return storeAnalyticsMapper.selectStoreAnalyticsList(storeAnalytics);
    }

    /**
     * 新增店铺访问统计
     * 
     * @param storeAnalytics 店铺访问统计
     * @return 结果
     */
    @Override
    public int insertStoreAnalytics(StoreAnalytics storeAnalytics)
    {
        return storeAnalyticsMapper.insertStoreAnalytics(storeAnalytics);
    }

    /**
     * 修改店铺访问统计
     * 
     * @param storeAnalytics 店铺访问统计
     * @return 结果
     */
    @Override
    public int updateStoreAnalytics(StoreAnalytics storeAnalytics)
    {
        return storeAnalyticsMapper.updateStoreAnalytics(storeAnalytics);
    }

    /**
     * 批量删除店铺访问统计
     * 
     * @param pigcmsIds 需要删除的店铺访问统计主键
     * @return 结果
     */
    @Override
    public int deleteStoreAnalyticsByPigcmsIds(String pigcmsIds)
    {
        return storeAnalyticsMapper.deleteStoreAnalyticsByPigcmsIds(Convert.toStrArray(pigcmsIds));
    }

    /**
     * 删除店铺访问统计信息
     * 
     * @param pigcmsId 店铺访问统计主键
     * @return 结果
     */
    @Override
    public int deleteStoreAnalyticsByPigcmsId(Long pigcmsId)
    {
        return storeAnalyticsMapper.deleteStoreAnalyticsByPigcmsId(pigcmsId);
    }
}
